import express from 'express';
import sku from './router/sku.js';
import user from './router/user.js';
import userAdmin from './admin/user.js';
import bodyParser from 'body-parser';
// import db from './model/index.js';
import swaggerInstall from './utils/swaggers.js';

const app = express();
// 文档
swaggerInstall(app);

app.use(bodyParser.json());
app.use(bodyParser.urlencoded({ extended: false }));

app.use(express.static('public'));

app.use('/api/sku', sku);
app.use('/api/user', user);

app.use('/admin/user', userAdmin);

app.listen(3002, () => {
  console.log('app run');
});

